<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>bftpd documentation: Configuration</TITLE>
 <LINK HREF="bftpddoc-en-4.html" REL=next>
 <LINK HREF="bftpddoc-en-2.html" REL=previous>
 <LINK HREF="bftpddoc-en.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="bftpddoc-en-4.html">Next</A>
<A HREF="bftpddoc-en-2.html">Previous</A>
<A HREF="bftpddoc-en.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3.</A> <A HREF="bftpddoc-en.html#toc3">Configuration</A></H2>

<H2><A NAME="ss3.1">3.1</A> <A HREF="bftpddoc-en.html#toc3.1">User management</A>
</H2>

<P>You can manage the users simply by editing /etc/passwd and, if your system supports it, /etc/shadow. Any user existent in /etc/passwd can connect to the FTP server if he has a usable password and meets certain configurable criteria. Having anonymous users is possible by setting a configuration variable called ANONYMOUS_USER to yes. PAM is also supported.</P>
<H2><A NAME="ss3.2">3.2</A> <A HREF="bftpddoc-en.html#toc3.2">The configuration file</A>
</H2>

<H3>The global structure</H3>

<P>In the &quot;global&quot; structure, you can assign values to configuration options. The syntax is like the following:
<BLOCKQUOTE><CODE>
<PRE>
global {
  name1="value1"
  name2="value2"
}
</PRE>
</CODE></BLOCKQUOTE>
</P>
<H3>User structures</H3>

<P>There are also user structures, in which you can override the global settings for particular users. Example:
<BLOCKQUOTE><CODE>
<PRE>
global {
  name1="value1"
  name2="value2"
}
user foo {
  name1="value3"
}
</PRE>
</CODE></BLOCKQUOTE>

If the user foo is logged in, name1 will be value3. If another user is logged in, name1 will be value1. name2 is always value2.</P>
<H3>Group structures</H3>

<P>You can also define options for groups of users. It is just as it would be for one user, but you can put more than one user in a group. You can also put system groups into them by using the @ character. Example:
<BLOCKQUOTE><CODE>
<PRE>
group foo,bar,@baz {
  name1="value1"
}
</PRE>
</CODE></BLOCKQUOTE>

This options affect the users foo and bar and every user who is in the system group baz. A supplementary membership is sufficient.</P>
<H3>Directory structures</H3>

<P>You can set options which affects only the users who are in a certain directory, or in any subdirectory of it, recursively. Note that you must put these structures <EM>inside</EM> the global, user and group structures. This way, you can also override directory-specific settings for particular users. Example:
<BLOCKQUOTE><CODE>
<PRE>
global {
  name1="value1"
  directory "/foo" {
    name1="value2"
  }
}
user bar {
  directory "/foo" {
    name1="value3"
  }
}
</PRE>
</CODE></BLOCKQUOTE>

In this example, name1 will be value3 if the user bar is in the directory /foo. It will be value2 if another user is in the directory /foo. In any other case, it will be value1.</P>
<P>An explanation of the name/value pairs is in the example configuration file supplied with bftpd (if you are not upgrading, this file has already been copied to /etc on your system). Modify it so that it fits your needs. The defaults should be OK though.</P>
<HR>
<A HREF="bftpddoc-en-4.html">Next</A>
<A HREF="bftpddoc-en-2.html">Previous</A>
<A HREF="bftpddoc-en.html#toc3">Contents</A>
</BODY>
</HTML>
